using System;
using System.Diagnostics.CodeAnalysis;
using Plugins.Interfaces;

namespace Plugins.Core.Interfaces
{
    public interface IPluginManager
    {
        [SuppressMessage("Microsoft.Design", "CA1004")]
        IPluginConfigurationHost LoadServiceProvider<T>(string hostId, string hostName, string fileName, bool isDefault) where T : class, IPluginServiceProvider<T>;
        [SuppressMessage("Microsoft.Design", "CA1004")]
        void UnloadServiceProvider<T>(IPluginConfigurationHost host) where T : class, IPluginServiceProvider<T>;

        [SuppressMessage("Microsoft.Design", "CA1004")]
        IPluginConfiguration Load<T>(string hostId, string hostName, string fileName, bool isDefault);
        [SuppressMessage("Microsoft.Design", "CA1004")]
        void Unload<T>(IPluginConfiguration configuration);

        IPluginHostManager HostManager { get; }

        event EventHandler<PluginConfigurationHostEventArgs> LoadConfiguration;
        event EventHandler<PluginConfigurationHostEventArgs> UnloadConfiguration;

        int Count { get; }
    }
}

